var chatURL = "http://localhost:9092";
// 连接服务器
var socketHandler = function (socket, _connectFunction,_releaseFunction,_disconnectFunction) {
    socket.on('connect',function () {
        _connectFunction();
    });
    // 发布
    socket.on('chatevent', function (data) {
        _releaseFunction(data);
    });

    socket.on('disconnect', function () {
        _disconnectFunction();
    });

}
//发送消息
function socketSend(socket, _data) {
    console.log(JSON.stringify(_data));
    socket.emit('chatevent', _data);
}